import request from '../request'
import type { Info } from '@/TS/utlis/interface/Wode'
//上传图片
export const UploadIDCard = (data: any, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/api/profilePhotoUpload',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}

//个人资料查询
export const userInfoMsg = (Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/personalData',
      method: 'GET',
      show: false,
    },
    Proxy
  )
}

//提交个人信息
export const submitMyInfo = (data: Info.MyInfo, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/certification',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}
//个人信息查询
export const userInfoMy = (data: string, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/personal',
      method: 'GET',
      show: true,
      data,
    },
    Proxy
  )
}
//我的账户
export const userCountMy = (Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/myAccount',
      method: 'GET',
      show: true,
    },
    Proxy
  )
}

//骑手上传头像
export const uploadAvatar = (data: object | null, Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderUsers/updateAvatar/`,
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}
// 账户余额查询
export const accountBalance = (Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderUsers/getBalance`,
      method: 'GET',
      show: true,
    },
    Proxy
  )
}

// 昨日收入记录查询
export const yesterdayIncome = (data: any, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/yesterdayIncome',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )
}

//账户明细查询

export const accountDetails = (data: any, Proxy: any) => {
  return request(
    {
      url: '/rider/systemRiderUsers/accountDetails',
      method: 'POST',
      show: true,
      data,
    },
    Proxy
  )

}
// 我的评价数量
export const myEvaluateCount = (Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderUsers/riderEvaluationCount`,
      method: 'GET',
      show: true,
    },
    Proxy
  )
}
//  我的订单列表
export const myEvaluateList = (data: object, Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderUsers/riderEvaluation/`,
      method: 'POST',
      show: false,
      data
    },
    Proxy
  )
}
//我的已完成订单数量

export const myOverListCount = (data: any, Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderTakeaway/getMyOrderCount`,
      method: 'GET',
      show: false,
      data
    },
    Proxy
  )
}


// 我的已完成订单
export const myOverList = (data: any, Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderTakeaway/getMyOrders`,
      method: 'POST',
      show: false,
      data
    },
    Proxy
  )
}
// 外卖已完成订单详情
export const myOverListDetails = (id: number | string, Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderTakeaway/getMyOrderItem/${id}`,
      method: 'GET',
      show: true,
      data: ''

    },
    Proxy
  )
}
// 外卖已完成订单详情
export const runErrandOverListDetails = (orderId: number | string, data: any, Proxy: any) => {
  return request(
    {
      url: `/rider/errandController/getRunCompletedItem?orderId=${orderId}`,
      method: 'GET',
      show: true,
      data

    },
    Proxy
  )
}


// 我的状态查询
export const myStatus = (data: any, Proxy: any) => {
  return request(
    {
      url: `/rider/systemRiderUsers/updateRiderStatus`,
      method: 'GET',
      show: true,
    },
    Proxy
  )
}
//获取骑手位置信息
export const riderLaction = (data: object, Proxy: any) => {
  return request(
    {
      url: `/riderLocationRecord/getRiderLocationRecord`,
      method: 'POST',
      show: false,
      data
    },
    Proxy
  )
}

//获取今日订单统计
export const todayOrderStatistics = (data: object, Proxy: any) => {
  return request(
    {
      url: `/rider/statistics/takeOutOrders`,
      method: 'POST',
      show: true,
      data
    },
    Proxy
  )
}

//获取月订单统计
export const monthOrderStatistics = (data: object, Proxy: any) => {
  return request(
    {
      url: `/rider/statistics/monthOrders`,
      method: 'GET',
      show: true,
      data
    },
    Proxy
  )
}



